﻿import request from '/@/utils/request';
enum Api {
  AddWareHouse = '/api/wareHouse/add',
  DeleteWareHouse = '/api/wareHouse/delete',
  UpdateWareHouse = '/api/wareHouse/edit',
  PageWareHouse = '/api/wareHouse/page',
  ListWareHouseUser='/api/wareHouse/users',
}

/**
 * 增加资产仓库
 * @param params 
 * @returns 
 */
export const addWareHouse = (params?: any) =>
	request({
		url: Api.AddWareHouse,
		method: 'post',
		data: params,
	});

/**
 * 删除资产仓库
 * @param params 
 * @returns 
 */
export const deleteWareHouse = (params?: any) => request({
	url: Api.DeleteWareHouse,
	method: 'post',
	data: params,
});

/**
 * 编辑资产仓库
 * @param params 
 * @returns 
 */
export const updateWareHouse = (params?: any) => request({
	url: Api.UpdateWareHouse,
	method: 'post',
	data: params,
});

/**
 * 分页查询资产仓库
 * @param params 
 * @returns 
 */
export const pageWareHouse = (params?: any) =>request({
	url: Api.PageWareHouse,
	method: 'GET',
	data: params,
});

/**
 * 获取所有管理员
 * @param params 
 * @returns 
 */
export const ListWareHouseUser = (params?: any) => request({
	url: Api.ListWareHouseUser,
	method: 'GET',
	data: params,
});
